package com.example.crossdemo01.controller;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author linjy on 2023/2/8
 */
@RestController
public class IndexController {

    //@CrossOrigin(value = "http://localhost:8082")
    @GetMapping("/hello")
    public String hello() {

        return "get hello";
    }
    //@CrossOrigin(value = "http://localhost:8082")
    @PostMapping("/hello")
    public String hello2() {

        return "post hello";
    }

}
